import Vue from 'vue'
import App from './App.vue'
import TypeNav from '@/components/TypeNav'
import router from './router'
import Carsousel from '@/components/Carousel'
import pagination from '@/components/Pagination'
import '@/mock/mockServe'
import { Button, MessageBox } from 'element-ui'
import VueLazyload from 'vue-lazyload'
import "@/plugins/vaildate"
// 三级联动组件
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carsousel.name, Carsousel)
Vue.component(pagination.name, pagination)
Vue.component(Button.name, Button)
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
import atm from '@/assets/atm.gif'
Vue.use(VueLazyload, {
  loading: atm
})
import store from '@/store/index'
import 'swiper/css/swiper.css'
import * as API from '@/api'
new Vue({
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store
}).$mount('#app')
